package com.zhaokuner.pm.ctrl;

import com.zhaokuner.pm.common.utils.PinYinUtils;
import com.zhaokuner.pm.common.utils.RestClientUtil;
import com.zhaokuner.pm.model.NodeBO;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 类描述:更新
 *
 * @author 赵希坤 zhaoxikun
 * @date 2020/8/23 21:32
 */
@RestController
@RequestMapping("put")
public class UpdateCtrl {
    public String name(String name) {
        return name + " " + PinYinUtils.toSpell(name) + " " + PinYinUtils.toFirstSpell(name);
    }

    @RequestMapping("update")
    public Object add() {
        NodeBO bo = new NodeBO();
        bo.setLeader(name("智海"));
        return RestClientUtil.update("a", bo);
    }
}
